package kernel_gui.gui.extended;

import java.awt.event.ActionEvent;

import kernel_gui.gui.generic.graphic.MyProfile;

import common.entities.persistent.User;

@SuppressWarnings("serial")
public class EMyProfile extends MyProfile {
	
	User currentUser;
	
	public EMyProfile(){
		this.currentUser = kernel.getCurrentUser();
		userNameLabel.setText(String.format("%40s", this.currentUser.getName()));
		gamesPlayedLabel.setText(String.valueOf(this.currentUser.getGamesPlayed()));
		personalRecordLabel.setText(currency_nf.format(this.currentUser.getPersonalRecord()));
		moneyWonLabel.setText(currency_nf.format(this.currentUser.getMoneyWon()));
	}

	@Override
	protected void BackButtonActionPerformed(ActionEvent evt) {
		openAnotherFrame(EMainMenuFrame.class, true);
		
	}

	@Override
	protected void setWindowComponentsWhenCalledFromAnotherFrame() {
		/*not needed*/
		
	}

}
